<div class="form tabs" id="panel">
    <ul>
        {foreach from=$rows.control item=item key=key}
        {if $item.title}
            <li><a href="#tabs-{$key}">{$item.title}</a></li>
        {/if}
        {/foreach}
        {if $rows.inactive}<li><a href="#tabs-{$key+1}">{$smarty.const.StringFormMenuItemLabelParts}</a></li>{/if}
        {include file="form/menu.tpl"}
    </ul>
    {foreach from=$rows.control item=item key=key}
        {if $item.value or (!$item.disabled and !$item.value)}
        <div class="fieldContent" id="tabs-{$key}">
        {if $item.fieldTag == 'input'}
            {if $item.fieldType == 'file'}
                {include file='form/file/filesList.tpl'}
                {include file='form/file/uploadPanel.tpl'}
            {elseif $item.fieldType == "radio"}
                {include file="form/radio.tpl"}
            {else}
                {include file="form/input.tpl"}
            {/if}
        {elseif $item.fieldTag == "textarea"}
            {include file="form/textarea.tpl"}
        {elseif $item.fieldTag == "select"}
            {if $item.multiple == 1}
                {include file="form/multiselect/multiselect.tpl"}
            {else}
                {include file="form/select.tpl"}
            {/if}
        {/if}
        </div>
        {/if}
    {/foreach}
    {include file="form/inactive.tpl"}
</div>